var animcfg = new Array();
function confganim(node,from,to){
		animcfg.push({"node": '.'+node,
			"form":from,
			"to": to,
			"duration": 0.1,
			"yoyo":false,
			"repeatDelay":0,
			"repeat": -1
		});
	}
confganim("goldbox1",{"marginLeft":0},{"marginLeft":124});
confganim("goldbox2",{"marginLeft":0},{"marginLeft":124});
confganim("goldbox3",{"top":0},{"top":104});
confganim("goldbox4",{"top":104},{"top":0});
confganim("goldbox7",{"top":208},{"top":104});
confganim("goldbox8",{"left":104},{"left":0});
confganim("goldbox9",{"left":208},{"left":104});
confganim("goldbox6",{"top":104},{"top":208});

var anim = new KISSY.LayerAnim(animcfg);
$(".actionbox").on("mouseenter",function(){
		anim.run();
});
$(".actionbox").on("mouseleave",function(){
	anim.runReverse();
});
$(".action").on("click",function(){
	anim.pause();
});
// var x=0;
// $(".actionbox").on("mousemove",function(e){
	// if(e.pageX>x){
		// anim.runReverse();
	// }else{
		// anim.run(2);
	// }
	// x=e.pageX;
// });